import request from '@/utils/request'

// 白名单分页
export function whiteListPage(params) {
  return request({ url: '/online/management/admin/whitelist', params, method: 'GET'
  })
}
// 添加应用
export function addApp(data) {
  return request({ url: `/online/management/admin/whitelist/app`, data, method: 'POST'
  })
}
// 获取应用
export function getApp(id, params) {
  return request({ url: `/online/management/admin/whitelist/app/${id}`, params, method: 'GET'
  })
}
// 删除应用
export function deleteApp(id) {
  return request({ url: `/online/management/admin/whitelist/app/${id}`, method: 'DELETE'
  })
}
// 更新应用
export function updateApp(id, data) {
  return request({ url: `/online/management/admin/whitelist/app/${id}`, data, method: 'POST'
  })
}
// 绑定运营商
export function appBindOperator(id, data) {
  return request({ url: `/online/management/admin/whitelist/bind/${id}`, data, method: 'POST'
  })
}
// 未绑定运营商分页
export function unBindOperatorPage(id, params) {
  return request({ url: `/online/management/admin/whitelist/unbindOperator/${id}`, params, method: 'GET'
  })
}
// 解绑运营商
export function appUnBindOperator(id) {
  return request({ url: `/online/management/admin/whitelist/unbind/${id}`, method: 'DELETE'
  })
}
// 绑定运营商记录
export function bindOperatorPage(params) {
  return request({ url: '/online/management/admin/whitelist/list-app', params, method: 'GET'
  })
}

